import { createApp } from 'vue'
import App from './App.vue'
const app = createApp(App)
// 全局scss样式
import '@/styles/index.scss'
// 路由
import router from './router';
// 引入路由鉴权
import './premisstion'
// 按需加载antd文件
import useAntd from './core/lazy_antd';
// canvas粒子背景插件
import Particles from 'particles.vue3'
// 引入pinia
import pinia from './store';
// 注册antd组件
useAntd(app)
// 引入px2rem
import 'amfe-flexible'
// 注册SvgIcon脚本
import 'virtual:svg-icons-register'
// 引入SvgIcon组件
import SvgIcon from '@/components/SvgIcon/index.vue'
// 全局挂载SvgIcon
app.component('svg-icon', SvgIcon)
// 引入antd-icon
import * as Icons from '@ant-design/icons-vue'
// 全局注册antd-icon
const icons: any = Icons
for (const i in icons) {
  app.component(i, icons[i])
}
app.use(Particles)
app.use(router)
app.use(pinia)

app.mount('#app')
